package com.xuetang9.t9.hotel.utils;

/**
 * 状态码
 * @author pang
 */
public enum  HttpCodeEnum {
    //成功
    SUCCESS(0,"操作成功"),

    PARAM_REQUIRE(500,"缺少参数"),
    PARAM_INVALID(501,"无效参数"),
    SERVER_ERROR(503,"服务器内部错误"),
    DATA_NOT_EXIST(1002,"数据不存在"),
    DATA_NOT_NULL(502,"数据为空");


    int code;
    String errorMessage;

    HttpCodeEnum(int code, String errorMessage) {
        this.code = code;
        this.errorMessage = errorMessage;
    }

    public int getCode() {
        return code;
    }

    public String getErrorMessage() {
        return errorMessage;
    }
}
